package ucapital

// todo：xxxxxx 待实现具体的api

const (
	// 分页相关
	CapitalPageInvalid = -1
	CapitalPageBegin = 1
	CapitalPageStop = 0                // 表明访问停止
	CapitalPageLines = 100
	CapitalOrderType = "desc"
)

// RoomItem 机房信息
type RoomItem struct {
	Name 			string
}

// 返回的机房信息
type RoomData struct {
	NextPageNo 		int

	TotalCnt 		int
	Items 			[]RoomItem
}

type MachineItem struct {
	DeviceStatus		string
	OsRelease			string
	AppName 			string
	IP 					string
}

type MachineListData struct {
	RoomName 		string
	NextPageNo 		int						// 下一个页的Number

	TotalCnt 		int
	Items			[]MachineItem
}

type Capitaller interface {
	QueryRooms(pageNo int) (*RoomData, error)
	QueryOneMachine(ip string) (*MachineItem, error)
	QueryMultiMachine(ips []string) ([]MachineItem, error)

	QueryRoomMachineCnt(room string) (int, error)
	QueryRoomMachineList(room string, pageNo int) (*MachineListData, error)
}